From: emellor@ewan Date: Mon, 3 Oct 2005 23:56:24 +0000 (+0100) Subject: Remove the reason code from the destroy action -- the reason is only of value X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16763^2~56^2~7 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=f020dc6069b1a6f78cab64d2ab70c474969adc2f;p=xen.git Remove the reason code from the destroy action -- the reason is only of value on a graceful shutdown. Clarify the semantic difference between poweroff and halt (we use halt to mean 'shutdown and stop' and poweroff to mean 'shutdown and do whatever the configured behaviour is'). Signed-off-by: Ewan Mellor --- diff --git a/tools/python/xen/sv/DomInfo.py b/tools/python/xen/sv/DomInfo.py index 12135cd4fb..89feca01a5 100755 --- a/tools/python/xen/sv/DomInfo.py +++ b/tools/python/xen/sv/DomInfo.py @@ -139,7 +139,7 @@ class DomActionTab( ActionTab ): if not dom is None and dom != '0': if DEBUG: print ">DomShutDown %s" % dom try: - server.xend_domain_shutdown( int( dom ), "halt" ) + server.xend_domain_shutdown( int( dom ), "poweroff" ) except: pass @@ -175,7 +175,7 @@ class DomActionTab( ActionTab ): if not dom is None and dom != '0': if DEBUG: print ">DomDestroy %s" % dom try: - server.xend_domain_destroy( int( dom ), "halt" ) + server.xend_domain_destroy(int( dom )) except: pass diff --git a/tools/python/xen/xend/XendClient.py b/tools/python/xen/xend/XendClient.py index e0b4babc49..0919ae6da6 100644 --- a/tools/python/xen/xend/XendClient.py +++ b/tools/python/xen/xend/XendClient.py @@ -232,10 +232,9 @@ class Xend: {'op' : 'sysrq', 'key' : key}) - def xend_domain_destroy(self, id, reason): + def xend_domain_destroy(self, id): return self.xendPost(self.domainurl(id), - {'op' : 'destroy', - 'reason' : reason }) + {'op' : 'destroy' }) def xend_domain_save(self, id, filename): return self.xendPost(self.domainurl(id), diff --git a/tools/python/xen/xend/server/SrvDomain.py b/tools/python/xen/xend/server/SrvDomain.py index 896f5b4003..6b9cb7b202 100644 --- a/tools/python/xen/xend/server/SrvDomain.py +++ b/tools/python/xen/xend/server/SrvDomain.py @@ -71,8 +71,7 @@ class SrvDomain(SrvDir): def op_destroy(self, op, req): fn = FormFn(self.xd.domain_destroy, - [['dom', 'int'], - ['reason', 'str']]) + [['dom', 'int']]) val = fn(req.args, {'dom': self.dom.domid}) req.setHeader("Location", "%s/.." % req.prePathURL()) return val @@ -232,8 +231,6 @@ class SrvDomain(SrvDir): req.write('
' % url) req.write('') - req.write('Halt') - req.write('Reboot') req.write('
') req.write('
' % url)